A network storage system is a processing system that is used to store and retrieve data on behalf of one or more hosts on a network. A storage system operates on behalf of one or more hosts to store and manage data in a set of mass storage devices, such as magnetic or optical storage-based disks or tapes. Some storage systems are designed to service file-level requests from hosts, as is commonly the case with file servers used in a network attached storage (NAS) environment. Other storage systems are designed to service block-level requests from hosts, as with storage systems used in a storage area network (SAN) environment. Still other storage systems are capable of servicing both file-level requests and block-level requests, as is the case with certain storage servers made by NetApp, Inc. of Sunnyvale, Calif.
One common use of storage systems is data replication. Data replication is a technique for backing up data, where a given data set at a source is replicated at a destination, which is often geographically remote from the source. The replica data set created at the destination is called a “mirror” of the original data set. Typically replication involves the use of at least two storage systems, e.g., one at the source and another at the destination, which communicate with each other through a computer network or other type of data interconnect.
Replication can be done at a physical block level or at a logical block level. To understand the difference, consider that each data block in a given set of data, such as a file, can be represented by both a physical block, pointed to by a corresponding physical block pointer, and a logical block pointed to by a corresponding logical block pointer. These two blocks are actually the same data block. However, the physical block pointer indicates the actual physical location of the data block on a storage medium, whereas the logical block pointer indicates the logical position of the data block within the data set (e.g., a file) relative to other data blocks. When replication is performed at the physical block level, the replication process creates a replica at the destination storage system that has the identical structure of physical block pointers as the original data set at the source storage system. When replication is done at the logical block level, the replica at the destination storage system has the identical structure of logical block pointers as the original data set at the source storage system, but may (and typically does) have a different structure of physical block pointers than the original data set at the source storage system.
Conventional replication systems have a number of limitations. Replication at the physical block level requires that the destination storage system have the identical disk topology (or disk geometry) as the source storage system, whereas replication at the logical block level has certain performance issues. For example, replication of the physical block level cannot be performed between a source storage system and a destination storage system if they have different Redundant Array of Inexpensive Disk (RAID) configurations. In order to do logical replication, on the other hand, the file system of the source storage system is analyzed to determine changes that have occurred to the file system, and then those changes are transferred to the destination storage system in a particular order. This typically includes “walking” the directory trees at the source storage system to determine the changes to various file system objects within each directory tree, as well as identifying the changed file system object's location within the directory tree structure. The changes are then sent to the destination storage system in a certain order (e.g., directories before subdirectories, and subdirectories before files, etc.) so that the directory tree structure of the source storage system is preserved at the destination storage system. Updates to directories of the source file system are received and processed at the destination storage system before updates to the files in each of the directories can be received and processed. If updates to data in files are received before the updates to the directories that the files are stored in, then files are essentially orphaned because the destination server lacks adequate information as to in which directory the updates to files are to be stored. That is, updates to the data in the file cannot be processed before the directory referencing the file exists on the destination storage system.
The source storage system performs a first search through all the directories in the source storage system to figure out which directories have been updated, and then perform a second search within each directory to figure out which files have been updated in those directories. Moreover, additional searches are performed for file systems that have nested or hierarchical directory structures, such that higher-level directories are searched before lower-level directories (e.g., subdirectories), and so on. This analysis requires the source storage system to walk its way down from the top to the bottom of each of the directory trees of the source storage system before any updates to the file system in source storage system can be transferred to the destination storage system. Then, the updates are transferred to the destination storage system in order so that the destination storage system can properly process the updates to generate the replica file system in the destination storage system. This can take a significant amount of time and can impact performance in replication operations at the logical block level.